export default {
  setUser(state, options) {
    sessionStorage.setItem("token", options.token);
    const user = options.user;
    state.token = options.token;
    state.userState = {
      department: user.department,
      department_id: user.department_id,
      id: user.id,
      name: user.name,
      role: user.role,
      role_id: user.role_id,
      user_name: user.user_name,
    };
    state.rightList = user.menu;
    state.permissions = user.permissions;
  },
};
